<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="white" />
    <title>云矿</title>
    <link rel="stylesheet" href="../public/css/bootstrap.css">
    <link rel="stylesheet" href="../public/css/common.css" />
    <link rel="stylesheet" href="css/index.css" />
    <link rel="stylesheet" href="../public/css/weui.css">
    <link rel="stylesheet" href="../public/css/jquery-weui.css">
    <style>
        .weui-toast_content{
            margin-bottom: 0 !important;
        }
    </style>
</head>
<body style="background: #FFFFFF;">
<div id="moneypassword">
    <div>
        <div style="height: 1.8rem;"></div>
        <div class="public_top_header">
            <a href="javascript:history.back(-1)" class="weui-cell">
                <div class="weui-cell__hd">
                    <img src="../public/images/jiantouleft.png" />
                </div>
                <div class="weui-cell__bd">资金密码</div>
            </a>
        </div>
    </div>
    <div class="section container p-0">
        <div class="row justify-content-center">
            <div class="col-auto">
                请输入您设置的6位数资金密码
            </div>
        </div>
        <div class="row mt-2 justify-content-center">
            <div class="col-auto d-flex justify-content-center">
                <input type="password" style="text-align: center;outline: none;" v-model="password" placeholder="请输入6位数资金密码" class="p-0" maxlength="6">
            </div>
        </div>
        <div class="row justify-content-center">
            <div class="col-auto loginBtn d-flex justify-content-center ">
                <span class="align-self-center" @click="nextpage()">下一步</span>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="../public/js/jquery-2.1.4.js"></script>
<script src="../public/js/jquery-weui.js"></script>
<script type="text/javascript" src="../public/js/vue.js" ></script>
<script type="text/javascript" src="../public/js/font_size.js" ></script>
<script type="text/javascript" src="../public/js/common.js" ></script>
<script type="text/javascript">
    $(function(){
        var vm = new Vue({
            el:"#moneypassword",
            data: {
                password:''
            },
            methods:{
                nextpage:function(){
                    var userid=local.getData("yb_user_info").id;
                    var laterMillid=local.getData("milldetail").millid;
                    var agoMyMillid=local.getData("mymilldetail").millid;
                    var money=local.getData("millorder").money;
                    var sum=local.getData("millorder").num;
                    var safetyPasswd=this.password;
                    AjaxRequest({
                        url:_url+"/money/wallet/paypwdproving",
                        load:true,
                        data:{
                            userid,
                            safetyPasswd
                        },
                        type:"post",
                        success(res){
                            if(isReqSucceed(res)){
                                AjaxRequest({
                                    url:_url+"/money/mill/millupgrade",
                                    load:true,
                                    data:{
                                        userid,
                                        laterMillid,
                                        agoMyMillid,
                                        money,
                                        sum
                                    },
                                    type:"post",
                                    success(res){
                                        if(isReqSucceed(res)){
                                            window.location.href="./upgradesuccess.html"
                                        }
                                    }
                                })
                            }
                        }
                    })
                }
            }
        })
    })
</script>
</body>
</html>